package cc.verywell.pureblock.msg.nfs.map;

import cc.verywell.pureblock.func.node.KeyShell;
import cc.verywell.pureblock.msg.nfs.NfsLocalStoreProvider;
import cc.verywell.pureblock.msg.nfs.idx.NfsIdxCloudCache;
import cc.verywell.pureblock.util.sign.Sha;

/**
* 
* Copyright © 2019 TanYaqiu. All rights reserved.
* @author TanYaqiu 
* @address flat 601
* @date 2019年4月20日 上午8:14:30
*/
public interface FSmap extends NfsLocalStoreProvider,NfsIdxCloudCache {

	default public KeyShell put(byte[] value) {
		KeyShell key = new KeyShell(Sha.getInstance().hash(value));
		if(put(key,value)) {
			return key;
		}
		return null;
	}
	public boolean put(KeyShell key, byte[] value);
	public boolean remove(KeyShell key);
	public byte[] get(KeyShell key);
	public boolean contain(KeyShell key);
}
